package cn.cheneyjoo.service.impl;

import cn.cheneyjoo.Dao.IEmployeeDao;
import cn.cheneyjoo.model.Employee;
import cn.cheneyjoo.model.EmployeeExtend;
import cn.cheneyjoo.service.IEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class EmployeeServiceImpl implements IEmployeeService {
    @Autowired
    private IEmployeeDao employeeDao;

    /**
     * 查询全部员工信息
     * @return
     */
    @Override
    public List<EmployeeExtend> findAll() {
        return employeeDao.findAll();
    }

    /**
     * 保存员工
     * @param employee
     */
    @Override
    public void save(Employee employee) {
        employeeDao.save(employee);
    }
}
